<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 	xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:p="http://primefaces.org/ui"
    	xmlns:ec="http://www.b2cexpress.com.br/ecommerce"
    	xmlns:s="http://www.suricattus.com.br/jsf/ui"
		xmlns:sf="http://www.suricattus.com.br/jsf/fn"
    	xmlns:composite="http://java.sun.com/jsf/composite">
    	
	<composite:interface>
		<composite:attribute name="item" type="br.com.b2cexpress.ecommerce.domain.dto.item.ItemDto" required="true" />
	</composite:interface>
	
	<composite:implementation>
		<h:panelGroup rendered="#{cc.attrs.item.item.tipoItem.id != 1 or !cc.attrs.item.item.grupoProduto.isGrupoSeguro()}">
			<h:panelGroup rendered="#{recuperarParametrosSistemaExternoController.quantidadeParcelasSemJuros ne null 
					and recuperarParametrosSistemaExternoController.quantidadeParcelasSemJuros gt 0
					and recuperarParametrosSistemaExternoController.calcularQuantidadeParcelasSemJuros(cc.attrs.item) gt 1}" >
				<p class="info-comerciais">
					<span>
						<h:outputText value="#{recuperarParametrosSistemaExternoController.calcularQuantidadeParcelasSemJuros(cc.attrs.item)} x" />
						<h:outputText value=" #{labels['label.de']} " style="text-transform: lowercase;" />
						<h:outputText value="R$" />
						<h:outputText value="#{recuperarParametrosSistemaExternoController.calcularValorParcelaItem(cc.attrs.item)}">
							<f:convertNumber maxFractionDigits="2" minFractionDigits="2" />
						</h:outputText>
					</span>
				</p>
				<p class="info-comerciais-detalhamento">
					<h:outputText value=" #{labels['label.sem.juros']} " style="text-transform: lowercase;" />	
				</p>
			</h:panelGroup>
		</h:panelGroup>
		<h:panelGroup rendered="#{cc.attrs.item.item.tipoItem.id == 1 and cc.attrs.item.item.grupoProduto.isGrupoSeguro()}">			
			<p class="info-comerciais">
				<span>
					<h:outputText value="#{recuperarParametrosSistemaExternoController.parametrosSistema.qtdParcelas} x" />
					<h:outputText value=" #{labels['label.sem.juros']} " style="text-transform: lowercase;" styleClass="info-comerciais-detalhamento"/>	
				</span>
			</p>
		</h:panelGroup>
	</composite:implementation>
	
</html>
